
// excel01Dlg.h : header file
//

#pragma once
#import "C:\Program Files (x86)\Common Files\Microsoft Shared\office11\mso.dll" rename("DocumentProperties", "DocumentPropertiesXL") rename("RGB", "RBGXL")
#import "C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\vbe6ext.olb"
#import "C:\Program Files (x86)\Microsoft Office\Office11\EXCEL.EXE" rename("DialogBox", "DialogBoxXL") rename("RGB", "RBGXL") rename("DocumentProperties", "DocumentPropertiesXL") rename("ReplaceText", "ReplaceTextXL") rename("CopyFile", "CopyFileXL") no_dual_interfaces

#include <vector>
typedef std::vector<CString> vString;

// Cexcel01Dlg dialog
class Cexcel01Dlg : public CDialogEx
{
// Construction
public:
	Cexcel01Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_EXCEL01_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButton1();
	afx_msg void OnBnClickedButton2();
	afx_msg void OnEnChangeEdit2();
	// static information
	CString m_csInfo;
	// search content
	CString m_csSearch;
	//
	int m_nChecked;

	CXTPReportControl m_rcResult;
	void LoadXls(LPCTSTR lpszFile);
	void Search();
	//
	Excel::_ApplicationPtr mpXL;

	afx_msg void OnDestroy();
	afx_msg void OnReportGetItemMetrics(NMHDR*  pNotifyStruct, LRESULT* /*result*/);
	afx_msg void OnReportLButtonDblDown(NMHDR*  pNotifyStruct, LRESULT* /*result*/);
};


//////////////////////////////////////////////////////////////////////////
// class CExcel01Record

class CExcel01Record : public CXTPReportRecord
{
public:
	CExcel01Record(const vString& v, COLORREF clr);

	CString _value;
	COLORREF _clr;
protected:
private:
};